#include <iostream>
#define SIZE 100

using namespace std;

int all[SIZE], _less[SIZE], i, j, n;



void read();

int main()
{
	read();
	j = -1;
	for(i = 0; i <= n; ++i)
		if (all[i] >= 0)
		{
			++j;
			_less[j] = all[i];
		}
	i = 0;
	while (i < j)
	{
		cout << _less[i] << " ";
		++i;
	}
	
	return 0;
}

void read()
{
	cout << "n = ";
	cin >> n;
	for (i = 0; i < n; ++i)
	{	cout << "numbers[" << i << "]= ";
		cin >> all[i];
	}
}